Reesenews.views.ArticleView = Ext.extend(Ext.Panel, {
	article : Ext.emptyFn,

	initComponent : function() {

		this.backButton = new Ext.Button({
			text : 'back',
			//ui : 'back',
			handler : this.backButtonTap,
			scope : this
		});

		this.topToolbar = new Ext.Toolbar({
			title : '<div class="maintitle">reesenews</div>',
			items : [ this.backButton, {
				xtype : 'spacer'
			}, ]
		});

		this.dockedItems = [ this.topToolbar ];

		var content = this.article.data.content;
		var title = this.article.data.title;
		var date = this.article.data.pubDate;
		

		Ext.apply(this, {
			fullscreen : true,
			layout : 'fit',
			cardSwitchAnimation : 'slide',
			scroll: 'vertical',
			html : '<div class = "article-title">' + title + '</div>'
					+ '<div class = "article-date">' + date + '</div>'
					+ '<div class="article-content">' + content + '</div>'
		});
		Reesenews.views.ArticleView.superclass.initComponent.call(this);

	},
	backButtonTap : function() {
		Ext.dispatch({
			controller : Reesenews.controllers.articleController,
			action : 'return'
		});
	}
});